<template>
  <div class="detail-step">
    <!-- +order.orderState 将字符串转为数字 -->
    <XtxSteps :activeIndex="order.orderState === 6 ? 1 : +order.orderState">
      <XtxStepsItem :desc="order.createTime" title="提交订单"/>
      <XtxStepsItem :desc="order.payTime" title="付款成功"/>
      <XtxStepsItem :desc="order.consignTime" title="商品发货"/>
      <XtxStepsItem :desc="order.endTime" title="确认收货"/>
      <XtxStepsItem :desc="order.evaluationTime" title="订单完成"/>
    </XtxSteps>
  </div>
</template>

<script>


export default {
  name: 'DetailStep',
  props: {
    order: {
      type: Object,
      default: () => ({})
    }
  }
}
</script>

<style lang="less" scoped>
.detail-step {

}
</style>
